<script>
	export default {
		data() {
			return {

			}
		},
		methods: {
			checkIsIPhoneX() {
				const systemInfo = uni.getSystemInfoSync()
				const model = systemInfo.model
				const screenHeight = systemInfo.screenHeight
				const screenWidth = systemInfo.screenWidth;
				// 判断是否为 iPhone X 系列设备
				if (model.indexOf('iPhone X') !== -1 || (screenHeight / screenWidth >= 2 && systemInfo.system.indexOf(
						'iOS') !== -1)) {
					this.$globalVariable.height = 85;
				} else {
					this.$globalVariable.height = 50;
				}
			}
		},
		onLaunch: function() {},
		onShow: function() {
			this.checkIsIPhoneX();
		},
		onHide: function() {

		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	@import "@/uni_modules/uview-ui/index.scss";
	@import "common/demo.scss";
</style>